/*
* 
* Name				Lawrence Bush
* Student Number	660 220 742
* Email				bushl2@rpi.edu, Lawrence_Bush@dps.state.ny.us
* Class				Distributed Algorithms and Systems (Spring 2002)
* Professor			Costas Busch
*
* Final Project	Implement a Lock-Free Linked List (based on Valois' paper)
*
*/
//
//////////////////////////////////////////////////////////////////////
//	Description of Program Files
//
//		File					Purpose
//		----					-------
//		
//		criticalsection.h		This file declares the critical section class interface.
//								It contains a windows CRITICAL_SECTION object.
//								It declares the constructor, destructor, enter
//								and leave member funtions.

#if !defined(AFX_crit_H__A111892ACLEEED__INCLUDED_)
#define      AFX_crit_H__A111892ACLEEED__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#include <windows.h>
#include <stdio.h>

// *************************************
// *************************************
// ***                               ***
// ***        Critical Section       *** 
// ***          Declaration          ***
// ***                               ***
// *************************************
// *************************************
class CriticalSection {
public:
	// Initializes constructors, destructors 
	// and the class interface functions.
	CriticalSection();
	~CriticalSection();
	void Enter();
	void Leave();
private:
	// Initialize the data member.
	// Note: this is where the REAL windows critical
	// section object is hiding. 
	CRITICAL_SECTION m_CritSect;
};

#endif